package org.jeecg.modules.zcgl.service;

import com.baomidou.mybatisplus.core.conditions.Wrapper;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.IService;
import org.jeecg.modules.api.vo.param.PaymentConfirmationParamVo;
import org.jeecg.modules.zcgl.entity.ReceivablesInfo;
import org.jeecg.modules.zcgl.vo.CollectionInformationVo;
import org.jeecg.modules.zcgl.vo.ReceivablesInfoVo;
import org.jeecg.modules.zcgl.vo.statistical.BillReceivablesDetailsVo;
import org.jeecg.modules.zcgl.vo.statistical.IncomeOperatingStatisticalVo;
import org.jeecg.modules.zcgl.vo.statistical.PaymentRecordsVo;

import java.util.List;
import java.util.Map;

/**
 * @Description: 应收款项信息
 * @Author: jeecg-boot
 * @Date:   2020-06-23
 * @Version: V1.0
 */
public interface IReceivablesInfoService extends IService<ReceivablesInfo> {

    boolean demolitionFee(ReceivablesInfoVo vo);

    boolean toll(ReceivablesInfo receivablesInfo);

    IPage<ReceivablesInfo> pageByWechat(Page<ReceivablesInfo> page, QueryWrapper<ReceivablesInfo> queryWrapper, Map<String, Object> param);

    List<String> queryIdList(Wrapper<ReceivablesInfo> queryWrapper, Map<String, Object> param);

    boolean amountConfirmation(String id, Integer isAllConfirmation);

    IPage<CollectionInformationVo> queryCollectionInformationVoList(Page<CollectionInformationVo> page, QueryWrapper<CollectionInformationVo> queryWrapper);

    List<CollectionInformationVo> queryCollectionInformationVoList(QueryWrapper<CollectionInformationVo> queryWrapper);

    /**
     * 查询已收账单收款明细
     * @param receivablesInfos
     * @return
     */
    ReceivablesInfo queryReceivedDetails(ReceivablesInfo receivablesInfos);

    /**
     * 手机缴费确认
     * @param vo
     * @param receivablesInfoList
     */
    boolean paymentConfirmation(PaymentConfirmationParamVo vo, List<ReceivablesInfo> receivablesInfoList);

    /**
     * 作废
     * @param vo
     * @return
     */
    boolean nullify(ReceivablesInfo vo);

    /**
     * 自动扣费
     * @param receivablesInfo
     */
    void automaticDeduction(ReceivablesInfo receivablesInfo);

    void saveOrUpdateById(ReceivablesInfo receivablesInfo);

    boolean paymentConfirmation(PaymentConfirmationParamVo vo);

    void checkModel(ReceivablesInfo receivablesInfo);

    void demolitionFeeCheckModel(ReceivablesInfoVo vo);

    IPage<PaymentRecordsVo> queryPaymentRecordsList(Page<PaymentRecordsVo> page,QueryWrapper<PaymentRecordsVo> queryWrapper);

    List<PaymentRecordsVo> queryPaymentRecordsList(QueryWrapper<PaymentRecordsVo> queryWrapper);


    /**
     * 账单已收未收明细
     * @param page
     * @param queryWrapper
     * @return
     */
    IPage<BillReceivablesDetailsVo> queryBillReceivablesDetailsPageList(Page<BillReceivablesDetailsVo> page,QueryWrapper<BillReceivablesDetailsVo> queryWrapper);

    List<BillReceivablesDetailsVo> queryBillReceivablesDetailsList(QueryWrapper<BillReceivablesDetailsVo> queryWrapper);

    /**
     * 经营收入汇总
     * @param page
     * @param queryWrapper
     * @return
     */
    IPage<IncomeOperatingStatisticalVo> queryIncomeOperatingStatisticalPageList(Page<IncomeOperatingStatisticalVo> page,QueryWrapper<IncomeOperatingStatisticalVo> queryWrapper);
}
